<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <h2>{{ msg }}</h2>
    <!-- <h2 v-text="count"></h2>
    <input type="text" v-model="msg">
    <p v-html="htmlStr"></p> -->
    <button v-on:click="clickHandler('hello', 123)">点我</button>
    <input type="text" v-on:input="inputHandler">
  </div>
  <script src="./dep.js"></script>
  <script src="./watcher.js"></script>
  <script src="./compiler.js"></script>
  <script src="./index.js"></script>
  <script>
    let vm = new Vue({
      el: '#app',
      data:{ 
        msg: 'hello',
        count: 1,
        person: {
          name: 'zs',
          age: 18
        },
        htmlStr: `<div><p style="color: red;">live stra</p></div>`
      },
      methods: {
        clickHandler(msg, number){
          console.log(number);
        },
        inputHandler(e){
          console.log(e.target.value);
          this.msg = e.target.value
        }
      }
    })
    console.log(vm);
  </script>
</body>
</html>